<?php
namespace App\Module\Admin\Request\Teacher;

use Hyperf\Validation\Request\FormRequest;

class CreateRequest extends FormRequest{

    public function authorize(): bool
    {
        return true;
    }

    public function rules(): array
    {
        return [
            'name'=>'required',
            'mobile'=>'required|digits:11|unique:teacher,mobile',
            'photo'=>'required|url',
            'wechat_no'=>'required',
            'introduct'=>'required',
            'sex'=>'required|in:男,女',
            'campus'=>'required',
            'password'=>'required|min:6'
        ];
    }
}